function getTimeFromat(format){
	let dateTool = new Date();
	let month = dateTool.getMonth()+1;
	if(month < 10){
		month = "0"+month;
	}
	let days = dateTool.getDate();
	if(days < 10){
		days = "0"+days;
	}
	let date = dateTool.getFullYear() + format + month + format + (days);
	return date;
}

function getDisTime(day,format){
	let dateTool = new Date();
	dateTool.setDate(dateTool.getDate() - day);
	let month = dateTool.getMonth()+1;
	if(month < 10){
		month = "0"+month;
	}
	let days = dateTool.getDate();
	if(days < 10){
		days = "0"+days;
	}
	let date = dateTool.getFullYear() + format + month + format + (days);
	return date;
}

function getCurrentHours(){
	let dateTool = new Date();
	return dateTool.getHours();
}

function getCurrentTime(){
	let dateTool = new Date();
	return dateTool.getTime();
}

export default{
	getDisTime,
	getCurrentTime,
	getTimeFromat,
	getCurrentHours
}